<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>沙漠中的勇者</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="沙漠中的勇者">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="沙漠中的勇者">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="沙漠中的勇者">
  
    <link rel="alternate" href="/atom.xml" title="沙漠中的勇者" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">沙漠中的勇者</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-使用Hexo-Github一步步搭建属于自己的博客（基础）" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2018/01/30/使用Hexo-Github一步步搭建属于自己的博客（基础）/" class="article-date">
  <time datetime="2018-01-30T08:23:44.000Z" itemprop="datePublished">2018-01-30</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/01/30/使用Hexo-Github一步步搭建属于自己的博客（基础）/">使用Hexo+Github一步步搭建属于自己的博客（基础）</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="一、第一步：下载安装Git"><a href="#一、第一步：下载安装Git" class="headerlink" title="一、第一步：下载安装Git"></a>一、第一步：下载安装Git</h2><p>1、<a href="https://link.jianshu.com/?t=https://git-for-windows.github.io/" target="_blank" rel="noopener">Git下载</a></p>
<p>2、安装步骤</p>
<p> <img src="/image/1.png" alt="azbz1"><br> <img src="/image/2.png" alt="azbz2"></p>
<p> 让后一路默认</p>
<h2 id="二、第二步：下载安装node-js"><a href="#二、第二步：下载安装node-js" class="headerlink" title="二、第二步：下载安装node.js"></a>二、第二步：下载安装node.js</h2><p> 1、<a href="https://link.jianshu.com/?t=https://nodejs.org/en/" target="_blank" rel="noopener">nodeJs下载地址</a></p>
<p><img src="/image/3.png" alt="nodejs"></p>
<p>2、安装步骤：一路默认就行（安装路径根据自己需要更改）</p>
<h2 id="三、第三步：安装hexo"><a href="#三、第三步：安装hexo" class="headerlink" title="三、第三步：安装hexo"></a>三、第三步：安装hexo</h2><p>1、利用 npm 命令即可安装。在任意位置点击鼠标右键，选择Git Bash</p>
<p><img src="/image/4.png" alt="dd"></p>
<p>2、2、输入命令：npm install -g hexo</p>
<p><img src="/image/5.png" alt=""></p>
<p>这里如果地址被“墙”，可以参考 <a href="https://link.jianshu.com/?t=http://blog.csdn.net/jzooo/article/details/46781805" target="_blank" rel="noopener">这篇文章的“安装Hexo”部分</a></p>
<h2 id="四、第四步：初始化Hexo"><a href="#四、第四步：初始化Hexo" class="headerlink" title="四、第四步：初始化Hexo"></a>四、第四步：初始化Hexo</h2><p>1、创建文件夹（我的是在E盘创建的Hexo）<br><img src="/image/6.png" alt=""></p>
<p>2、在Hexo文件下，右键运行Git Bash，输入命令：hexo init<br><img src="/image/7.png" alt=""><br><img src="/image/8.png" alt=""></p>
<p>3、在_config.yml,进行基础配置</p>
<p><img src="/image/9.png" alt=""></p>
<p>其中可以在这里 <a href="https://link.jianshu.com/?t=https://hexo.io/themes/" target="_blank" rel="noopener">浏览更多主题</a>，然后在Hexo文件夹下 Git Bash</p>
<p>输入命令：git clone <a href="https://github.com/iissnan/hexo-theme-nextthemes/next（next为主题名字），来获得更多主题" target="_blank" rel="noopener">https://github.com/iissnan/hexo-theme-nextthemes/next（next为主题名字），来获得更多主题</a><br><img src="/image/10.png" alt=""><br><img src="/image/11.png" alt=""></p>
<p>4、本地浏览博客</p>
<p>分别输入 如下命令：</p>
<p>hexo g</p>
<p>hexo s</p>
<p>这里有 <a href="https://link.jianshu.com/?t=https://segmentfault.com/a/1190000002632530" target="_blank" rel="noopener">更多hexo常用命令</a></p>
<p><img src="/image/12.png" alt=""></p>
<p>  在浏览器输入：localhost：4000 ，就可以进行访问，效果如下：</p>
<p>  <img src="/image/13.png" alt=""></p>
<p>  5、写文章</p>
<p>在E:\Hexo\source_posts文件下，新建.md文件就可以写文章</p>
<p><img src="/image/14.png" alt=""></p>
<hr>
<p>title: 我的博客</p>
<hr>
<p><img src="/image/15.png" alt=""><br><img src="/image/16.png" alt=""></p>
<h2 id="五、部署到Github上"><a href="#五、部署到Github上" class="headerlink" title="五、部署到Github上"></a>五、部署到Github上</h2><p>1、申请Github账号，（注意别忘了进行账号邮箱验证）</p>
<p>2.new repository</p>
<p><img src="/image/17.png" alt=""><br><img src="/image/18.png" alt=""></p>
<p>然后点击</p>
<p><img src="/image/19.png" alt=""></p>
<p>3、在_config.yml进行配置</p>
<p><img src="/image/20.png" alt=""></p>
<p>4、安装<a href="https://link.jianshu.com/?t=https://github.com/hexojs/hexo-deployer-git" target="_blank" rel="noopener">hexo-deployer-git</a>自动部署发布工具</p>
<pre><code>npm instal lhexo-deployer-git  --save
</code></pre><p>  <img src="/image/21.png" alt=""></p>
<p>  5、发布到Github</p>
<p>输入如下命令：hexo clean &amp;&amp; hexo g &amp;&amp; hexo d</p>
<p><img src="/image/22.png" alt=""><br><img src="/image/23.png" alt=""><br><img src="/image/24.png" alt=""><br><img src="/image/25.png" alt=""><br>6、测试访问</p>
<p>在浏览器输入：<a href="https://yanqiangmiffy.github.io/" target="_blank" rel="noopener">https://yanqiangmiffy.github.io/</a><br><img src="/image/26.png" alt=""></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2018/01/30/使用Hexo-Github一步步搭建属于自己的博客（基础）/" data-id="cjd1fyawb0006ov68o495cwlc" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-myHexo" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2018/01/30/myHexo/" class="article-date">
  <time datetime="2018-01-30T03:51:06.000Z" itemprop="datePublished">2018-01-30</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/01/30/myHexo/">myHexo</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>这是我的第一个博客</p>
<pre><code class="bash">对对对
</code></pre>
<p>More info: <a href="https://gitee.com/xzlpy" target="_blank" rel="noopener">码云</a></p>
<h3 id="你是谁啊"><a href="#你是谁啊" class="headerlink" title="你是谁啊"></a>你是谁啊</h3>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2018/01/30/myHexo/" data-id="cjd1fyawp0008ov68l4p63oga" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2018/01/30/hello-world/" class="article-date">
  <time datetime="2018-01-30T03:16:30.000Z" itemprop="datePublished">2018-01-30</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/01/30/hello-world/">Hello World</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2018/01/30/hello-world/" data-id="cjd1fyavl0002ov68yctdfqw5" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo使用笔记" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/10/12/Hexo使用笔记/" class="article-date">
  <time datetime="2017-10-12T01:58:03.000Z" itemprop="datePublished">2017-10-12</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2017/10/12/Hexo使用笔记/">Hexo使用笔记</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="Hexo新建笔记"><a href="#Hexo新建笔记" class="headerlink" title="Hexo新建笔记"></a>Hexo新建笔记</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo -g  //安装  </span><br><span class="line">npm update hexo -g 	//升级 </span><br><span class="line">hexo version  	//查看hexo的版本</span><br><span class="line">hexo init nodejs-hexo   //创建nodejs-hexo 名字的本地文件</span><br><span class="line">hexo init nodejs-hexo    //创建博客</span><br><span class="line">hexo init blog   //初始化，生成文件夹为blog</span><br><span class="line">cd blog  	//进入blog文件夹</span><br><span class="line">npm install     //安装依赖库</span><br><span class="line">hexo generate   //生成一套静态网页</span><br><span class="line">hexo server  //运行测试,浏览器打开地址，http://localhost:4000/</span><br><span class="line">hexo deploy   //进行部署。</span><br><span class="line"></span><br><span class="line">hexo new &quot;new article&quot;  //新建文章‘new article’</span><br></pre></td></tr></table></figure>
        
          <p class="article-more-link">
            <a href="/2017/10/12/Hexo使用笔记/#more">Read More</a>
          </p>
        
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2017/10/12/Hexo使用笔记/" data-id="cjd1fyauk0000ov68jrg5iaaf" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li></ul>

    </footer>
  </div>
  
</article>


  

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Hexo/">Hexo</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/">Hexo</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">January 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">October 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2018/01/30/使用Hexo-Github一步步搭建属于自己的博客（基础）/">使用Hexo+Github一步步搭建属于自己的博客（基础）</a>
          </li>
        
          <li>
            <a href="/2018/01/30/myHexo/">myHexo</a>
          </li>
        
          <li>
            <a href="/2018/01/30/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2017/10/12/Hexo使用笔记/">Hexo使用笔记</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2018 xuzheng<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>